/**
 * Pxb Utility
 * Copyright (C) 2009 Panxiaobo.
 * $Id$
 */
package pxb.util.http;

import java.io.IOException;
import java.io.InputStream;
import java.util.Map;

/**
 * @author Panxiaobo
 * 
 */
public interface HttpConnector {
	HttpResponse get(String url, Map<String, String> headers) throws IOException;

	HttpResponse get(String url, Map<String, String> headers, Map<String, String> parameters) throws IOException;

	HttpResponse get(String url) throws IOException;

	HttpResponse post(String url, Map<String, String> headers, Map<String, String> parameters) throws IOException;

	HttpResponse post(String url, Map<String, String> headers, byte[] data) throws IOException;

	public interface HttpResponse {
		void close() throws IOException;

		String getHead(String head) throws IOException;

		InputStream getInputStream() throws IOException;

		int getStatus() throws IOException;
	}

}
